﻿'Params
'user (Required) : The user name to fetch top tracks for.
'period (Optional) : overall | 7day | 3month | 6month | 12month - The time period over which to retrieve top tracks for.
'limit (Optional) : The number of results to fetch per page. Defaults to 50.
'page (Optional) : The page number to fetch. Defaults to first page.
'api_key (Required) : A Last.fm API key.

'Auth
'This service does not require authentication. 

Public Class UserGetTopTracks
        Inherits BaseRequest
    Dim user As String = ""
    Dim period As String = ""
    Dim limit As String = ""
    Dim page As String = ""

        Public xmlresponse As XDocument = Nothing

    Public Sub New(user As String, period As String, limit As String, page As String)
        Me.user = user
        Me.period = period
        Me.limit = limit
        Me.page = page
        
    End Sub

        Public Sub sendRequest()
        InitializeMembers("user.getTopTracks")

        AddMember("user", user, True)
        AddMember("period", period, False)
        AddMember("limit", limit, False)
        AddMember("page", page, False)
        AddMember("api_key", My.Settings.api_key, False)

        xmlresponse = sendPOSTResponse()
        End Sub

    'need a user object
    'Public Function getResponse() As UserGetTopTracks
    'Dim response As New UserGetTopTracks
    '   response.user = New user(xmlresponse.<lfm>.<album>.First)
    '  Return response
    'End Function
End Class

